<ui:component xmlns="http://www.w3.org/1999/xhtml"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:ui="http://java.sun.com/jsf/facelets">
    <div id="status-update">
        <h:form styleClass="validate">
            <h:outputLabel for="status" value="Update your status"/>
            <h:inputTextarea id="status" value="#{messageBean.message.text}" styleClass="required" required="true">
                <f:validateLength minimum="1" maximum="1000"/>
            </h:inputTextarea>
            <br />
            <h:commandButton value="Share">
                <f:ajax event="click" listener="#{messageBean.create}" execute="@form" render=":messages" />
            </h:commandButton>
        </h:form>
    </div>
</ui:component>